// 重置表单
export function resetForm(refName) {
  if (this.$refs[refName]) {
    this.$refs[refName].resetFields()
  }
}

// 添加日期范围
export function addDateRange(params, dateRange) {
  let search = params
  dateRange = Array.isArray(dateRange) ? dateRange : []
  search.beginTime = dateRange[0]
  search.endTime = dateRange[1]
  return search
}
